﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataAccess.Models
{
    /// <summary>
    /// 用户
    /// </summary>
    public class AgencyUsers
    {
        /// <summary>
        /// 主键，自增长
        /// </summary>
        [XYD.Framework.Key]
        [XYD.Framework.Identity()]
        public int id { get; set; }
        /// <summary>
        /// 账号
        /// </summary>
        public string username { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public string password { get; set; }
        /// <summary>
        /// 用户称呼
        /// </summary>
        public string nickname { get; set; }
        /// <summary>
        /// 联系手机
        /// </summary>
        public string tel { get; set; }
        /// <summary>
        /// 账号，0未启用，1已启用
        /// </summary>
        public int state { get; set; }
        /// <summary>
        /// 上级代理id
        /// </summary>
        public int superior { get; set; }
        /// <summary>
        /// 是否开启推广，0未开启，1已开启
        /// </summary>
        public int promotion { get; set; }
        /// <summary>
        /// 关联阿里妈妈账号id
        /// </summary>
        public string alimamaid { get; set; }
        /// <summary>
        /// 分佣比例 百分比
        /// </summary>
        public int commission { get; set; }
        /// <summary>
        /// 上级代理分佣比例
        /// </summary>
        public int superior_commission { get; set; }
        /// <summary>
        /// 推广位 网站pid
        /// </summary>
        public string site_pid { get; set; }
        /// <summary>
        /// 推广位 微信pid
        /// </summary>
        public string wechat_pid { get; set; }
        /// <summary>
        /// 推广位 qqpid
        /// </summary>
        public string qq_pid { get; set; }
        /// <summary>
        /// 群商品类别标签
        /// </summary>
        public string label { get; set; }
        ///// <summary>
        ///// 发单群名称
        ///// </summary>
        //public string group_name { get; set; }
        ///// <summary>
        /////群管微信昵称
        ///// </summary>
        //public string group_wx_nickname { get; set; }
        ///// <summary>
        ///// 群管机器人名称
        ///// </summary>
        //public string group_robot_name { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string remark { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime add_data { get; set; }
       
        /// <summary>
        /// 是否删除，0未删除，1已删除
        /// </summary>
        public int is_delete { get; set; }


        public string head_img { get; set; }

        public int promoter_id { get; set; }
        /// <summary>
        /// 上上级ID
        /// </summary>
        public int onthe_superior { get; set; }
        /// <summary>
        /// 上上级分成比例 60
        /// </summary>
        public int onthe_superior_commission { get; set; }

        #region 机器人配置

        /// <summary>
        /// 发单间隔(秒)
        /// </summary>
        //public int send_interval { get; set; }
        ///// <summary>
        ///// 发单时间段
        ///// </summary>
        ///// ["09:00-12:00","13:00-16:00","18:00-23:00"]
        //public string send_stage { get; set; }
        /// <summary>
        /// 发单时间段 反序列化
        /// </summary>
        //[XYD.Framework.Write(false)]
        //public List<string> send_stageArr
        //{
        //    get
        //    {
        //        if (string.IsNullOrEmpty(this.send_stage))
        //        {
        //            return new List<string>();
        //        }
        //        else
        //        {
        //            return XYD.Common.JsonHelper.DeserializeJson<List<string>>(this.send_stage);
        //        }
        //    }
        //}
        /// <summary>
        /// 发单去重
        /// </summary>
        //public int send_removal { get; set; }






        #endregion

        /// <summary>
        /// 网站推广位id
        /// </summary>
        public string  site_adzoneid	{get;set;}
        /// <summary>
        /// 微信推广位id
        /// </summary>
        public string wechat_adzoneid{get;set;}
        /// <summary>
        /// qq推广位id
        /// </summary>
        public string qq_adzoneid { get; set; }
        /// <summary>
        /// 微信账号
        /// </summary>
        public string wx_name { get; set; }
        /// <summary>
        /// openid
        /// </summary>
        public string openid { get; set; }
        /// <summary>
        /// 支付宝账号
        /// </summary>
        public string AlipayID { get; set; }
        /// <summary>
        /// 支付宝真实姓名
        /// </summary>
        public string AliName { get; set; }
        /// <summary>
        /// 最后更新时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 权限 1商品转链
        /// </summary>
        public string permission { get; set; }


    }
}
